%\documentclass{article}
\documentclass[UTF8, a4paper,twoside]{book} %this has problems

% ==================== Book flag==========================

\global\let\wholebook=\relax %without relax, we build article, esle book

\input{common-en.tex}

\setcounter{page}{1}

\graphicspath{
  {img/}
  {nat/}
  {recursion/}
  {algebra/}
  {category-theory/}
}

\makeindex

\begin{document}

% set PDF properties
\hypersetup{pdftitle={unplugged},%
            pdfauthor={liuxinyu95@gmail.com},%
            pdfsubject={Math},%
            pdfkeywords={Math, CS}}

% ================================================================
%                 COVER PAGE
% ================================================================

\title{{\bf \Huge Mathematics of Programming}
  \centering
  \scalebox{0.4}{\includegraphics{img/fibonacci-spiral.eps}}
            }

\author{LIU Xinyu
  \thanks{{\bfseries LIU Xinyu} \newline
    Version: 0.6180339887498949 \newline
    Email: liuxinyu95@gmail.com \newline
    }}

\maketitle

% ================================================================
%                 Content
% ================================================================

%\newpage
\tableofcontents
\newpage

%\part{Preface}
\subimport{nat/}{nat-en.tex}

\subimport{recursion/}{recursion-en.tex}

%\subimport{algebra/}{algebra-zh-cn.tex}

%\subimport{category-theory/}{category-zh-cn.tex}

\part{Appendix}
\appendix
%\appendixpage
\noappendicestocpagenum
\addappheadtotoc

%\subimport{appendix/nat/}{nat-en.tex}

%\subimport{appendix/recursion/}{recursion-en.tex}

%\input{fdl-1.3.tex}

\printindex

\end{document}
